package Service;

import java.util.HashMap;
import java.util.Map;

public class MiniApplicationContext {
    public Map<String,Object> mp = new HashMap<>();
    public MiniApplicationContext(String path)
    {
        try {
            var allBeans = ScanXml.getAllBeanDefinition(path);
            for(var bean: allBeans){
                mp.put(bean.id, BeanFactory.creatObject(bean));
            }
        }
        catch (Exception e)
        {
            System.out.println(e);
        }
    }
}
